<?php 
    class Pagination_Model extends CI_Model{
        protected $_table = "mock_products";
        function __construct(){ 
            $this->load->database(); 
        } 

		function count_all() {
		return $this->db->count_all('mock_products');
		}

        public function list_all($off,$start)
        {
            $this->db->limit($off,$start);
            return $this->db->get($this->_table)->result_array();
        }
        public function getProduct($id)
        {
            $this->db->where("product_id","$id");
            return $this->db->get($this->_table)->row_array();

        }
    } 
	
?>